﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Respository.Base
{
    public interface IRepositoryBase<T> where T : class
    {

        /// <summary>
        /// 无参数存储过程
        /// </summary>
        /// <param name="SPName">存储过程名称</param>
        /// <returns>返回值List<T></returns>
        List<T> QuerySP(string SPName);

        /// <summary>
        /// 有参数存储过程
        /// </summary>
        /// <param name="SPName">存储过程名称</param>
        /// <returns>返回值List<T></returns>
        List<T> QuerySP(string SPName, object parms);

        /// <summary>
        /// 无参数异步存储过程
        /// </summary>
        /// <param name="SPName">存储过程名称</param>
        /// <returns>返回值List<T></returns>
        Task<List<T>> QuerySPAsync(string SPName);

        /// <summary>
        /// 参数异步存储过程
        /// </summary>
        /// <param name="SPName">存储过程名称</param>
        /// <returns>返回值List<T></returns>
        Task<List<T>> QuerySPAsync(string SPName, object parms);
    }
}
